package com.learn.english.model.param;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.*;

import java.util.List;
import java.util.Map;

/**
 * @author TISNIW
 * @version 1.0
 * @date 2025/6/13 22:46
 * @desc
 */
@Getter
@Setter
@Builder
@NoArgsConstructor
@AllArgsConstructor
@JsonInclude(JsonInclude.Include.NON_NULL)
public class ModelsMessage {
    private String license; // 模型许可证信息
    private String modelfile; // 模型配置文件内容
    private String parameters; // 模型参数字符串
    private String template; // 模型提示模板
    private Details details; // 模型详细信息
    @JsonProperty("model_info")
    private Map<String,String> modelInfo; // 模型元信息
    private List<String> capabilities; // 模型能力列表，如completion, vision等
    @Override
    public String toString() {
        return "ModelsMessage{" + '\n' +
                "\tmodelfile: " + modelfile + ",\n" +
                "\tparameters: " + parameters + ",\n" +
                "\ttemplate: " + template + ",\n" +
                (details != null ? "\tdetails: {\n" + details.toString().indent(2) + "\t},\n" : "\tdetails: null,\n") +
                (modelInfo != null ? "\tmodel_info: {\n" + modelInfo.toString().indent(2) + "\t},\n" : "\tmodel_info: null,\n") +
                "\tcapabilities: " + capabilities + "\n" +
                '}';
    }
}
